<?php

$_availableEventLoops = array(
    'libevent' => '\Workerman\Events\Libevent',
    'event'    => '\Workerman\Events\Event'
);
$loop_name = '';
foreach ($_availableEventLoops as $name=>$class) {
    if (extension_loaded($name)) {
        $loop_name = $name;
        break;
    }
}

echo "当前采用的模型:$loop_name";